<include file="Common@Backend/header" />
    <!-- page heading start-->
    <div class="page-heading">
        <h3>
            {$breadcrumb.A}
        </h3>
        <ul class="breadcrumb">
            <li>
                {$breadcrumb.M}
            </li>
            <li>
                {$breadcrumb.C}
            </li>
            <li class="active"> {$breadcrumb.A}  </li>
        </ul>
    </div>
    <!-- page heading end-->
    
    <!--body wrapper start-->
    <div class="wrapper">
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <form role="form" action="{$action}" method="post">
                    <input type="hidden" name="id" value="{$id}" />
                        <header class="panel-heading">
                            编辑用户
                        </header>
                        <div class="panel-body">
                            <div class="form-group">
                                <label for="username">用户名</label>
                                <input type="text" name="username" class="form-control" id="username" placeholder="输入用户名" value="{$userInfo.username}" disabled="true">
                            </div>
                            <div class="form-group">
                                <label for="password">密码</label>
                                <input type="password" name="password" class="form-control" id="title" placeholder="输入密码" >
                            </div>
                            <div class="form-group">
                                <label for="nickname">别名</label>
                                <input type="text" name="nickname" class="form-control" id="sort" placeholder="输入别名" value="{$userInfo.nickname}">
                            </div>
                            <div class="form-group">
                                <label for="status">状态</label>
                                <select class="form-control m-bot15" id="status" name="status">
                                    <if condition="$userInfo.status eq 1">
                                        <option value="1" selected="selected">启用</option>
                                        <option value="0">关闭</option>
                                    <else />
                                        <option value="1">启用</option>
                                        <option value="0" selected="selected">关闭</option>
                                    </if>
                                </select>
                            </div>
                        </div>
                        <header class="panel-heading">
                            设置用户角色
                        </header>
                        <div class="panel-body">
                            <div class="form-group">
                                <div class="col-sm-12 icheck ">
                                    <foreach name="roleList" item="role">
                                    <div class="flat-green">
                                        <div class="radio">
                                            <if condition="in_array($role['id'],$roleUserIds)" >
                                            <input type="checkbox" value="{$role.id}" name="roles[]" checked />
                                            <else />
                                            <input type="checkbox" value="{$role.id}" name="roles[]" />
                                            </if>
                                            <label>{$role.name}</label>
                                        </div>
                                    </div>
                                    </foreach>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-primary">保存</button>
                            <a href="{$cancel}" class="btn btn-primary">取消</a>
                        </div>
                    </form>
                </section>
            </div>
        </div>
    </div>
    <!--body wrapper end-->
<include file="Common@Backend/footer" />